$(function () {
    var fn = ABUS.Fn;
    var param = window.__param__;
    var _ = window._;
    var listData = [];

    document.addEventListener('touchmove', function (e) {
        isDrag = true;
        e.preventDefault();
    }, {passive: false});



    $("#being_process").on("touchend", "li", function () {
        if (isDrag) {
            isDrag = false;
            return true;
        }
        var data = listData[$(this).index()];
        data.time = $(this).find('.car4').text();
        fn.page_goto({
            url : "./yewuyuan_shouye_progress.html",
            data : data
        })
    });

    $('#searchInput').on('input', _.debounce(function (e) {
        var str = $(this).val();
        init(str)
    },500));

    init();
    function init(val) {
        fn.get({
            url: "/user/order/waitingChildOrders",
            data: {
                "searchValue": val
            },
            success: function (data) {
                $("#being_process ul").renderTemp(data);
                listData = data.data;
                new IScroll('#being_process', {mouseWheel: true});
            }
        });
    }
});